feat(frontend): Add Near Intents terms of service to swap review#12293
Merged
AntonioVentilii merged 3 commits intomainfrom Apr 2, 2026
Merged
Conversation
…ice-to-swap-review
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a NEAR Intents Terms of Service acknowledgement notice to the swap review UI when the selected swap provider is NEAR Intents, to satisfy 1Click API ToS acknowledgement requirements.
Changes:
- Add a new i18n string (
swap.text.near_intents_tos) and type definition for it. - Introduce a
NEAR_INTENTS_TOS_LINKconstant and a newSwapNearIntentsTosinfo-box component. - Render the ToS info box conditionally in
SwapReviewwhen NEAR Intents is the selected provider (and the feature is enabled).
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/frontend/src/lib/types/i18n.d.ts | Extends swap i18n type with near_intents_tos. |
| src/frontend/src/lib/i18n/en.json | Adds English ToS disclaimer text with link placeholder. |
| src/frontend/src/lib/constants/swap.constants.ts | Adds a constant for the NEAR Intents ToS URL. |
| src/frontend/src/lib/components/swap/SwapReview.svelte | Conditionally shows the NEAR Intents ToS info box on the review step. |
| src/frontend/src/lib/components/swap/SwapNearIntentsTos.svelte | New MessageBox component rendering the ToS text as HTML with a link. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DenysKarmazynDFINITY
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Near Intents require that we make the users acknowledge their terms of service for the 1click API. As per our legal team approval, we create an info box, before the last review step, to warn the user.
In the next iteration, we will save this acknowledgment in the backend, so that we can persist it, and avoid showing it again, if already acknowledged the current version.